package com.emmy.walnut.custom;

import com.github.mikephil.charting.charts.BarLineChartBase;
import com.github.mikephil.charting.formatter.ValueFormatter;

import java.text.DecimalFormat;

public class HourAxisValueFormatter extends ValueFormatter {
    private final BarLineChartBase<?> chart;

    private DecimalFormat decimalFormat = new DecimalFormat("###.00");

    public HourAxisValueFormatter(BarLineChartBase<?> chart) {
        this.chart = chart;
    }

    @Override
    public String getFormattedValue(float value) {
        return decimalFormat.format(value)+"h";
    }
}
